package mapper;

import entity.Category;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    int deleteByPrimaryKey(Long category_id);

    int insert(Category record);

    int insertSelective(Category record);

    Category selectByPrimaryKey(Long category_id);

    int updateByPrimaryKeySelective(Category record);

    int updateByPrimaryKeyWithBLOBs(Category record);

    int updateByPrimaryKey(Category record);

    Category queryByLeftStrAndLevel(@Param("leftStr") String leftStr, @Param("level") Integer level);

    Category queryByRightStrAndLevel(@Param("rightStr") String rightStr, @Param("level") Integer level);
    List<Category> queryByLevel(Integer level);

    List<Category> selectByLevel0(Integer level);

    void updateShow_status(@Param("category_id") Long category_id, @Param("show_status") Integer show_status);

    List<Category> queryByParent_id(Long category_id);
}